package com.zhanglong;

import com.zhanglong.AppConfig;
import com.zhanglong.service.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(AppConfig.class);

        UserService userService = (UserService) annotationConfigApplicationContext.getBean("userService");

        userService.test();

        /*System.out.println(annotationConfigApplicationContext.getBean("zhanglongFactoryBean"));
        System.out.println(annotationConfigApplicationContext.getBean("&zhanglongFactoryBean"));*/
    }
}